WPS 加载项开发 > 表格 API 参考 > PivotItemList > PivotItemList 对象

指定的数据透视表中所有 PivotItem 对象的集合。

说明

每个 PivotItem 代表数据透视表字段中的一个项。

使用 PivotCell 对象的 RowItems 或 ColumnItems 属性可返回一个 PivotItemList 集合。

示例

一旦返回了 PivotItemList 集合,您就可以使用 Item 方法来标识某个特定的 PivotItem 列表。下例向用户显示与单元格 B5 相关联的 PivotItem 列表。本示例假定数据透视表位于活动工作表上。

示例代码
function CheckPivotItemList() {
    // Identify contents associated with PivotItemList.
    MsgBox("Contents associated with cell B5: " + Application.Range("B5").PivotCell.RowItems.Item(1))
}


请参阅